package io.lkt.modules.sys.dao;

import io.lkt.modules.sys.entity.BOrderInfoEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.lkt.modules.sys.entity.BOrderVitalEntity;
import io.lkt.modules.sys.entity.SysUserEntity;
import io.lkt.modules.sys.entity.VipOrderAnalyseEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 
 * 
 * @author xss
 * @email dustwas@163.com
 * @date 2019-04-29 15:04:53
 */
@Mapper
public interface BOrderInfoDao extends BaseMapper<BOrderInfoEntity> {

    List<BOrderInfoEntity> queryList(Map<String,Object> map);

    List<BOrderVitalEntity> queryVital(Map<String,Object> map);

    Integer queryTotal(Map<String,Object> map);

    Integer queryVitelTotal(Map<String,Object> map);

    int addOrder(BOrderInfoEntity bOrderInfoEntity);

    BOrderInfoEntity getInfo(String id);

    int drawback(String id);

    BOrderVitalEntity queryVitalSum(Map<String, Object> map);

    BOrderVitalEntity queryVitalRefundSum(Map<String, Object> map);

    Integer queryPrepayTotal(Map<String, Object> map);

    BOrderInfoEntity getLatestPrepayOrder(Map<String, Object> params);

    void updateFollowStatus(@Param("orderId") String orderId,
                            @Param("followTime") Date followTime,
                            @Param("followDuration") Long followDuration,
                            @Param("userId") Long userId,
                            @Param("remark") String remark);

    List<SysUserEntity> getValidFollowOrderSummaryList(Map<String, Object> params);

    List<SysUserEntity> getValidDealedOrderSummaryList(Map<String, Object> params);

    List<SysUserEntity> getSysUserFollowList(Map<String, Object> params);

    Integer getSysUserFollowListTotal(Map<String, Object> params);

    List<String> getSysUserFollowOrderIdList(Map<String, Object> params);

    List<String> getSysUserDealedOrderIdList(Map<String, Object> params);

    List<BOrderInfoEntity> getfollowInfoByUserId(Map<String, Object> params);

    List<VipOrderAnalyseEntity> getGzhVipOrderAnalyse(Map<String, Object> params);

    List<VipOrderAnalyseEntity> getSummaryVipOrderAnalyse(Map<String, Object> params);
}
